<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
</head>
<body>
<div th:fragment="posts">

    <div class="starter-template panel" th:each="post : ${pager.posts}">
        <div class="panel-heading">
            <h1><a th:text="${post.title}" th:href="@{'/post/' + ${post.id}}">Title</a></h1>
            <div th:text="'Created: ' + ${#dates.format(post.createDate, 'dd-MMM-yyyy')} + ' by '">
                Created by
            </div>
            <div><a th:text="${post.user.username}" th:href="@{'/blog/' + ${post.user.username}}">User</a>
            </div>
        </div>
        <h3 class="panel-body" th:text="${post.body}">Body</h3>
        <br></br>
    </div>

</div>
</body>
</html>